package indi.onem.two.datetype;

import java.util.Arrays;

public class NtextDataType {

	byte bNum = 0;
	short sNum = 0;
	int iNum=0;
	long lNum=0L;
	float fNum =0.0f;
	double dNum = 0.0d;
	char cNum = '\u0000';
	String strNum =null;
	boolean  flag= false;

	public static void main(String[] args) {
		//		test_variable();
		//		test_array();
		//		test_arrayCopy();
		//		test_ArrayCopyOfDemo();
		test_fill();
	
	}


	private static void test_fill() {
		// TODO Auto-generated method stub
		char[] copyFrom = {'d', 'e', 'c', 'a', 'f', 'f', 'e',
				'i', 'n', 'a', 't', 'e', 'd'};
		//		Arrays.fill(copyFrom,0,5,'A');
		Arrays.parallelSort(copyFrom);

		System.out.println(new String(copyFrom));
	}

	private static void test_ArrayCopyOfDemo_BinarySearch() {
		char[] copyFrom = {'d', 'e', 'c', 'a', 'f', 'f', 'e',
				'i', 'n', 'a', 't', 'e', 'd'};
		char[] ofRange = Arrays.copyOfRange(copyFrom, 0, copyFrom.length);
		//		  System.out.println(new String(ofRange));
		Arrays.sort(copyFrom);
		int binarySearch = Arrays.binarySearch(copyFrom, 'f');
		System.out.println(binarySearch);
		boolean b = Arrays.equals(copyFrom,ofRange);
		System.out.println(b);
	}

	private static void test_arrayCopy() {

		char[] copyFrom = { 'd', 'e', 'c', 'a', 'f', 'f', 'e',
				'i', 'n', 'a', 't', 'e', 'd' };

		char[] copyTo = new char[7];
		System.arraycopy(copyFrom, 5, copyTo, 0, 7);

		for (int i = 0; i < copyTo.length; i++) {
			System.out.println(copyTo[i]);
		}
		System.out.println(new String());
	}


	private static void test_variable() {
		// TODO Auto-generated method stub
		/*
		// TODO Auto-generated method stub

		// Invalid: cannot put underscores
		// adjacent to a decimal point
		float pi1 = 3_.1415F;
		// Invalid: cannot put underscores 
		// adjacent to a decimal point
		float pi2 = 3._1415F;
		// Invalid: cannot put underscores 
		// prior to an L suffix
		long socialSecurityNumber1 = 999_99_9999_L;

		// OK (decimal literal)
		int x1 = 5_2;
		// Invalid: cannot put underscores
		// At the end of a literal
		int x2 = 52_;
		// OK (decimal literal)
		int x3 = 5_______2;

		// Invalid: cannot put underscores
		// in the 0x radix prefix
		int x4 = 0_x52;
		// Invalid: cannot put underscores
		// at the beginning of a number
		int x5 = 0x_52;
		// OK (hexadecimal literal)
		int x6 = 0x5_2; 
		// Invalid: cannot put underscores
		// at the end of a number
		int x7 = 0x52_;


		 */
	}




}
